package com.springbootshiro.demo;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class Demo1 {
    @RequestMapping("/")
    public  ModelAndView  hello(ModelAndView modelAndView){
         modelAndView.addObject("name","tian");
         modelAndView.setViewName("login");
        return modelAndView;
    }
    @RequestMapping("/test")
    public String test(Model model){
        model.addAttribute("user","hello ");
        return "test";
    }
}
